From: Niels Widger Date: Thu, 25 Feb 2021 20:31:00 +0000 (-0500) Subject: rpcd-mod-luci: Fix parsing of DUID-LLT's in duid2ea X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=bf34ccdfc0a7406b15797498ce0d33177c6f9e58;p=project%2Fluci.git rpcd-mod-luci: Fix parsing of DUID-LLT's in duid2ea Fix parsing of DUID-LLT's in duid2ea. Unlike DUID-LL's, DUID-LLT's have a 32-bit time field between the hardware type and link-layer address fields, see RFC 3315 Sections 9.2 and 9.4: https://tools.ietf.org/html/rfc3315#section-9.2 https://tools.ietf.org/html/rfc3315#section-9.4 therefore, the link-layer address starts at offset 16 instead of 8. Signed-off-by: Niels Widger (cherry picked from commit 8920a2bf71e544fada3de824126a5c8f1c596b63) --- diff --git a/libs/rpcd-mod-luci/src/luci.c b/libs/rpcd-mod-luci/src/luci.c index ae4f3eee8c..4cdf91b1a3 100644 --- a/libs/rpcd-mod-luci/src/luci.c +++ b/libs/rpcd-mod-luci/src/luci.c @@ -285,7 +285,7 @@ duid2ea(const char *duid) switch (len) { case 28: if (!strncmp(duid, "00010001", 8)) - p = duid + 8; + p = duid + 16; break;